//@ts-nocheck
import { defineStore } from "pinia";

export const useLocalStore = defineStore("area_localStore", {
  state: () => {
    return {
      markerClusterFlag: true,
      selectedFeature: null,
      visibleLineClassIds: null,
      visiblePointClassIds: null,
      areaVisibleFlag: true,
      updateFlagCount: -1,
    };
  },
  actions: {
    setMarkerClusterFlag(value) {
      this.markerClusterFlag = value;
    },
    setSelectedFeature(feature) {
      this.selectedFeature = feature;
    },
    setVisibleLineClassIds(ids: Array<string>) {
      this.visibleLineClassIds = ids;
    },
    setVisiblePointClassIds(ids: Array<string>) {
      this.visiblePointClassIds = ids;
    },
    setAreaVisibleFlag(flag: boolean) {
      this.areaVisibleFlag = flag;
    },
    increaseUpdateFlagCount() {
      this.updateFlagCount += 1;
    },
  },
});
